<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>How to get the data using free public interface</title>
</head>
<body>
		<fieldset>
			<legend>List flights from HAN to SGN</legend>
			<label>${msg}</label>
			<c:forEach var="flight" items="${flights}">
				--------------------------------------<br/>
				Airlines (code-name):
				<c:forEach var="carrier" items="${flight.carriers}">
				${carrier.code} - ${carrier.name} 
				</c:forEach><br/>
				Airport (code-name):
				<c:forEach var="location" items="${flight.locations}">
				${location.code} - ${location.name}
				</c:forEach><br/>
				Price: ${flight.price.amount} ${flight.price.currencyCode}<br/>
				Departure Flight Information:<br/>
					+ Flight numbers: 
					<c:forEach var="flightnumber" items="${flight.outboundInfo.flightNumbers}">
					${flightnumber}
					</c:forEach><br/>
					+ Airports:
					<c:forEach var="airport" items="${flight.outboundInfo.airports}">
					${airport}
					</c:forEach><br/>
					+ Local Departure time: ${flight.outboundInfo.localDepartureTimeStr} <br/>
					+ Local Arrival time: ${flight.outboundInfo.localArrivalTimeStr} <br/>
					+ Number of Stop: ${flight.outboundInfo.numStops} <br/>
					+ Duration(min): ${flight.outboundInfo.durationInMin} <br/>
				Arrival Flight Information for round trip search: <br/>
					+ Flight numbers: 
					<c:forEach var="flightnumber" items="${flight.inboundInfo.flightNumbers}">
					${flightnumber}
					</c:forEach><br/>
					+ Airports:
					<c:forEach var="airport" items="${flight.inboundInfo.airports}">
					${airport}
					</c:forEach><br/>
					+ Local Departure time: ${flight.inboundInfo.localDepartureTimeStr} <br/>
					+ Local Arrival time: ${flight.inboundInfo.localArrivalTimeStr} <br/>
					+ Number of Stop: ${flight.inboundInfo.numStops} <br/>
					+ Duration(min): ${flight.inboundInfo.durationInMin} <br/>
			</c:forEach>
		</fieldset>
</body>
</html>